<div id="JB1" class="Cuxiao_Div">
<h2>
促销信息审核
<em >X</em>
</h2>
<form action='/cuxiao/set/removed/0/<{$city_id}>' method='post' onsubmit="return check_leng(1);">
<table>
<tr>
<td align='right' width='80'>促销信息：</td>
<td><span id='span_title1'></span></td>
</tr>
<tr><td align='right'>处理原因：</td>
<td>
<select id="select_jb1" name="reason" style="width:130px; vertical-align:middle;">
<{foreach from = $msg.removed item = lis key=n}>
<option value="<{$n}>"><{$lis}></option>
<{/foreach}>
</select>
</td>
</tr>
<tr>
<td align='right'>说明：</td>
<td>
<textarea name="content_jb" id="content_jb1" style="width:315px; height:80px;"></textarea>
</td>
</tr>
<tr><td></td><td align='left'>
<input id="bt1" name="cuxiao" type="hidden" value="0" />
<input class="btn02 btn_Div" type="submit"   value="提交">
<input class="btn02 btn_Div" type="button" onclick="return close_div();"  value="关闭">
</td>
</tr>
</table>
</form>
</div>

<div id="JB2" class="Cuxiao_Div">
<h2>
促销信息审核
<em >X</em>
</h2>
<form action='/cuxiao/set/breakrules/0/<{$city_id}>' method='post' onsubmit="return check_leng(2);">
<table>
<tr>
<td align='right' width='80'>促销信息：</td>
<td><span id='span_title2'></span></td>
</tr>
<tr><td align='right'>处理原因：</td>
<td>
<select id="select_jb2" name="reason" style="width:130px; vertical-align:middle;">
<{foreach from = $msg.breakrules key=m item = lit}>
<option value="<{$m}>"><{$lit}></option>
<{/foreach}>
</select>
</td>
</tr>
<tr>
<td align='right'>说明：</td>
<td>
<textarea name="content_jb" id="content_jb2" style="width:315px; height:80px;"></textarea>
</td>
</tr>
<tr><td></td><td align='left'>
<input id="bt2" name="cuxiao" type="hidden" value="0" />
<input class="btn02 btn_Div" type="submit"   value="提交">
<input class="btn02 btn_Div" type="button" onclick="return close_div();"  value="关闭">
</td>
</tr>
</table>
</form>
</div>
<script type="text/javascript">
function check_leng(num)
{
   content = "#content_jb"+num;
   if($(content).val().length > 100)
   {
      alert("原因需要少于100字！");
      return false;
   }
}
function close_div()
{
  $("#JB1").css('display','none');
  $("#JB2").css('display','none'); 
}
function click_prompt(n,id,title)
{
  $("#JB1").css('display','none');
  $("#JB2").css('display','none');
  
  writeArea = "#set_"+id;
  jb        = '#JB'+n;
  span_title     = '#span_title'+n;
  content_jb     = '#content_jb'+n;
  bt             = "#bt"+n;
  $(bt).val(id);
  var write_y = $(writeArea).offset().top-100;
  //实现层的居中对齐
  var x=$(document).width();
  var y = $("body").height();
  //获得div的宽度一半，高度一半
  var z_left = (x - $("#JB1").width()) / 2;
  $(jb).css('display','block');
  $(jb).css("left",z_left);
  $(jb).css("top",write_y);
  $(span_title).html(title);
  $(content_jb).val('');
}
$(".Cuxiao_Div h2 em").click(function(){
$(".Cuxiao_Div").hide();
}) 
   function chg_url(type,city)
{
	  var url = '/cuxiao/list/'+type+'/'+city+'/1'; 
	  window.location = url;
}

</script>
